A computer network is a collection of interconnected computing devices that can exchange data and share resources. In a packet-based network, the computing devices communicate data by dividing the data into small blocks called packets, which are individually routed across the network from a source device to a destination device. The destination device extracts the data from the packets and assembles the data into its original form. Dividing the data into packets enables the source device to resend only those individual packets that may be lost during transmission.
Network routers maintain routing information that describes available routes through the network. Upon receiving a packet, a router examines information within the packet and forwards the packet in accordance with the routing information. In order to maintain an accurate representation of the network, routers exchange routing information in accordance with one or more routing protocols, such as an interior gateway protocol (IGP) or Border Gateway Protocol (BGP).
In some instances, a router may implement a form of load balancing referred to as weighted equal cost multi-path (WECMP) to allocate packet flows across multiple paths through the network to the same destination device. That is, a computer network may provide for a number of paths between an ingress router and an egress router. The ingress router may select one of these paths for a particular packet flow and another path, which may be equal in terms of costs or other metrics, for another packet flow. In selecting these paths, the ingress router may attempt to distribute these packet flows across the paths so as to avoid over-allocating packet flows to any one path. This form of load balancing may be weighted in that the ingress router may assign weights to each of the paths and allocate the packet flows according to the assigned weights.
Routers may also implement services, such as security services, network address translation (NAT) services, tunneling services, firewall services, and the like. Typically, the ingress router applies the services by redirecting packet flows to one or more service cards included within the router to apply the service to packets of the packet flows prior to forwarding the packets of the flow to their intended destination. Application of these services may however disrupt packet forwarding in accordance with WECMP such that router does not perform proper load balancing to distribute the packets of the flows in accordance with the defined weights.